﻿@model StripeDemo.Models.Customer

@{
    ViewBag.Title = "Customer";
}

<h2>StripeDemo</h2>


@using (Html.BeginForm(Html.BeginForm("Create", "Customer", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Create Customer</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.FullName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.FullName)
                @Html.ValidationMessageFor(model => model.FullName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.BillingAddress, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextAreaFor(model => model.BillingAddress, new { cols = 35, @rows = 3 })
                @Html.ValidationMessageFor(model => model.BillingAddress)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.PhoneNumber, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.PhoneNumber)
                @Html.ValidationMessageFor(model => model.PhoneNumber)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ExtraCustomerInfo, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ExtraCustomerInfo)
                @Html.ValidationMessageFor(model => model.ExtraCustomerInfo)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}
@Html.ActionLink("Back to List", "Index")

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
